﻿/*!
 * Datalist 5.3.1
 * https://github.com/NonFactors/MVC5.Datalist
 *
 * Copyright © NonFactors
 *
 * Licensed under the terms of the MIT License
 * http://www.opensource.org/licenses/mit-license.php
 */

.datalist {
    display: table;
    width: 100%;
}

.datalist-control {
    box-shadow: rgba(0, 0, 0, 0.0745098) 0 1px 1px inset;
    border-bottom-left-radius: 4px;
    border-top-left-radius: 4px;
    padding: 2px 2.4em 2px 6px;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    box-sizing: border-box;
    display: table-cell;
    position: relative;
}

    .datalist-control input {
        font: inherit;
        padding: 2px;
        border: none;
        margin: 2px;
        float: left;
        width: 100%;
    }

.datalist-item {
    transition: background linear 0.3s;
    border: 1px solid #DDDDDD;
    background: #F8F8F8;
    border-radius: 3px;
    padding: 1px 6px;
    color: #999999;
    margin: 2px;
    float: left;
}

    .datalist-item:hover {
        border-color: #CCCCCC;
        background: #F0F0F0;
    }

.datalist-close {
    margin-left: 6px;
    cursor: pointer;
}

    .datalist-close:hover {
        color: #000000;
    }

.datalist-readonly .datalist-control,
.datalist-readonly .datalist-control input {
    background: #EEEEEE;
}

.datalist-readonly .datalist-close {
    display: none;
}

.datalist-readonly .datalist-browse {
    cursor: not-allowed;
}

.datalist-browseless .datalist-control {
    border-radius: 4px;
}

.datalist-browse {
    border-bottom-right-radius: 4px;
    border-top-right-radius: 4px;
    border: 1px solid #CCCCCC;
    background-color: #EEEEEE;
    vertical-align: middle;
    display: table-cell;
    padding: 0 12px;
    cursor: pointer;
    border-left: 0;
    line-height: 1;
    width: 1%;
}

.datalist-icon {
    transform: rotate(310deg);
    vertical-align: middle;
    display: inline-block;
    margin: 0 2px 2px 0;
    border-radius: 50%;
    border: 2px solid;
    height: 0.8em;
    width: 0.8em;
}

    .datalist-icon:before {
        box-shadow: inset 0 0 0 32px;
        transform: translateX(-50%);
        border-radius: 1px;
        position: absolute;
        height: 0.5em;
        content: '';
        width: 3px;
        top: 0.6em;
        left: 45%;
    }

.datalist-widget {
    max-width: 98%;
}

    .datalist-widget .ui-dialog-title {
        line-height: 1.4em;
        min-height: 1.4em;
    }

    .datalist-dialog,
    .datalist-widget,
    .datalist-widget:after,
    .datalist-widget:before {
        -webkit-box-sizing: content-box;
        -moz-box-sizing: content-box;
        box-sizing: content-box;
    }

        .datalist-widget .datalist-dialog {
            padding: 1em;
        }

.datalist-dialog {
    font-size: 0.9em;
    min-width: 428px;
    display: none;
}

.datalist-search-group {
    height: calc(2em + 12px);
    position: relative;
}

.datalist-search-box {
    position: absolute;
    display: table;
}

.datalist-search {
    border-bottom-left-radius: 4px;
    border-top-left-radius: 4px;
    border: 1px solid #CCCCCC;
    line-height: 1.42857143;
    box-sizing: border-box;
    display: table-cell;
    padding: 6px 12px;
    width: 100%;
}

.datalist-rows {
    vertical-align: top;
    display: table-cell;
    width: 1%;
}

    .datalist-rows .ui-spinner {
        border-radius: 0 5px 5px 0;
        border-right: medium none;
        box-sizing: content-box;
        border-left: 0 none;
        height: 100%;
    }

    .datalist-rows input {
        background-color: #EEEEEE;
        padding: 6px 1.6em 6px 0;
        line-height: 1.42857143;
        box-sizing: border-box;
        text-align: center;
        width: 5em;
        margin: 0;
    }

    .datalist-rows a.ui-spinner-button {
        border: 1px solid #CCCCCC;
        border-bottom: none;
        border-top: none;
        width: 1.6em;
    }

    .datalist-rows a.ui-spinner-down {
        border-top: 1px solid #CCCCCC;
    }

    .datalist-rows .ui-icon {
        margin-left: -8px;
        cursor: pointer;
        left: 50%;
    }

.datalist-selector {
    vertical-align: middle;
    white-space: nowrap;
    display: table-cell;
    width: 1%;
}

    .datalist-selector button {
        background-color: rgba(94, 186, 103, 0.81);
        border: 1px solid #5C9845;
        border-radius: 4px;
        margin-left: 10px;
        padding: 5px 8px;
        min-width: 7em;
        color: #FFFFFF;
    }

        .datalist-selector button:hover {
            background-color: rgba(92, 175, 100, 0.81);
        }

.datalist-control-loader {
    animation: datalist-spin 1s infinite linear;
    border: 2px solid rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s linear;
    border-top-color: #444444;
    box-sizing: border-box;
    top: calc(3px + 0.4em);
    border-radius: 50%;
    position: absolute;
    display: none;
    right: 0.8em;
    height: 1em;
    opacity: 0;
    width: 1em;
}

.datalist-loading + .datalist-control-loader {
    transition: opacity 1.5s linear;
    display: block;
    opacity: 1;
}

.datalist-content {
    padding-right: 1px;
    position: relative;
    min-height: 7.3em;
}

.datalist-error,
.datalist-dialog-loader {
    background-color: #FFFFFF;
    border: 1px solid #DDDDDD;
    justify-content: center;
    align-items: center;
    position: absolute;
    display: flex;
    height: 100%;
    width: 100%;
}

    .datalist-dialog-loader > span {
        animation: datalist-spin 1s infinite linear;
        border: 0.5em solid rgba(0, 0, 0, 0.2);
        border-top-color: #444444;
    }

        .datalist-dialog-loader > span,
        .datalist-dialog-loader > span:after {
            border-radius: 50%;
            height: 5em;
            width: 5em;
        }

.datalist-error {
    background-color: #FFF6F6;
    border-color: #EBCCD1;
    color: #A94442;
}

.datalist-table {
    overflow-x: auto;
}

@keyframes datalist-spin {
    0% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(360deg);
    }
}

.datalist-dialog table {
    border-collapse: collapse;
    border: none;
    width: 100%;
}

.datalist-dialog tbody tr:hover {
    background-color: #ECECEC;
}

.datalist-dialog .selected {
    background-color: #F5F5F5;
}

.datalist-dialog tr {
    cursor: pointer;
}

.datalist-asc::after {
    padding-left: 3px;
    content: '\2193';
}

.datalist-desc::after {
    padding-left: 3px;
    content: '\2191';
}

.datalist-dialog th,
.datalist-dialog td {
    border: 1px solid #DDDDDD;
    line-height: 1.42857143;
    padding: 0.3em 0.6em;
}

.datalist-split td {
    background-color: #FFFFFF;
    color: transparent;
    cursor: default;
    border: none;
}

.datalist-dialog td:last-child {
    box-sizing: border-box;
    text-align: center;
    font-weight: bold;
    width: 2.5em;
}

    .datalist-dialog td:last-child::after {
        content: '\25CF';
    }

.datalist-dialog .selected td:last-child::after {
    content: '\2714';
    color: #5CB85C;
}

.datalist-dialog .datalist-empty {
    text-align: center;
    cursor: default;
}

    .datalist-dialog .datalist-empty:hover {
        background-color: inherit;
    }

    .datalist-dialog .datalist-empty td::after {
        content: '';
    }

.datalist-dialog ul {
    padding-top: 0.8em;
    text-align: right;
    margin: 0;
}

    .datalist-dialog ul li {
        display: inline;
        cursor: pointer;
    }

        .datalist-dialog ul li + li span {
            border-left: 0;
        }

    .datalist-dialog ul span {
        border: 1px solid #DDDDDD;
        box-sizing: content-box;
        display: inline-block;
        padding: 0.4em 0.6em;
        text-align: center;
        min-width: 0.9em;
        color: #777777;
    }

        .datalist-dialog ul span:focus,
        .datalist-dialog ul span:hover {
            background-color: #EEEEEE;
            color: #777777;
        }

.datalist-dialog .active span,
.datalist-dialog .active span:hover {
    background-color: rgba(77, 78, 80, 0.76);
    border-color: rgba(77, 78, 80, 0.76);
    color: #FFFFFF;
}
